/* 星座占卜样式文件 - 暖色调卡通风格 */

/* 基础样式重置和变量定义 */
:root {
    --primary-color: #ff6b9d;
    --secondary-color: #ff8a65;
    --accent-color: #ffb74d;
    --text-color: #5d4e75;
    --bg-color: #fff4e6;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(255, 182, 193, 0.4);
    --gradient-primary: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    --gradient-secondary: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    --gradient-tertiary: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --shadow: 0 8px 32px rgba(255, 105, 135, 0.15);
    --shadow-hover: 0 12px 40px rgba(255, 105, 135, 0.25);
    --border-radius: 24px;
    --transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --warm-pink: #ffb3ba;
    --warm-peach: #ffdfba;
    --warm-yellow: #ffffba;
    --warm-green: #baffc9;
    --warm-blue: #bae1ff;
    --warm-purple: #d1c4e9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 背景和整体布局 */
.constellation-body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.star-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
    z-index: -1;
}

@keyframes sparkle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* 页面头部 */
.constellation-header {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.constellation-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.main-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* 主要内容区域 */
.constellation-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 星座选择器 */
.constellation-selector {
    margin-bottom: 3rem;
}

.constellation-selector h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--accent-color);
}

.zodiac-wheel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.constellation-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.constellation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.constellation-item:hover::before {
    left: 100%;
}

.constellation-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent-color);
}

.constellation-item.active {
    background: var(--gradient-secondary);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 182, 77, 0.6);
}

.constellation-symbol {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.constellation-name {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.date-range {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 运势显示卡片 */
.daily-horoscope-section {
    margin-bottom: 3rem;
}

.daily-horoscope-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--accent-color);
}

.horoscope-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.horoscope-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.selected-constellation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.selected-symbol {
    font-size: 3rem;
    color: var(--accent-color);
}

.selected-name {
    font-size: 1.5rem;
    font-weight: bold;
}

.horoscope-date {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* 运势评分 */
.overall-score {
    text-align: center;
    margin-bottom: 2rem;
}

.overall-score h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.stars {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

.star {
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.3s;
}

.star.filled {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
}

.score-text {
    font-size: 1.1rem;
    font-weight: bold;
}

.detailed-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.score-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.score-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* 幸运元素 */
.lucky-elements {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.lucky-item {
    text-align: center;
}

.lucky-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.lucky-value {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* 运势描述 */
.horoscope-description,
.horoscope-advice {
    margin-bottom: 1.5rem;
}

.horoscope-description h4,
.horoscope-advice h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.horoscope-description p,
.horoscope-advice p {
    line-height: 1.8;
    font-size: 1.05rem;
}

/* 功能导航 */
.feature-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.nav-btn {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.nav-btn.active {
    background: var(--gradient-primary);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 182, 77, 0.4);
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 182, 77, 0.4);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* 方法选择按钮 */
.method-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.method-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.method-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.method-btn.active {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

/* 动作按钮 */
.action-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 135, 0.3);
}

/* 星座配对样式 */
.constellation-selectors {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.selector-group {
    flex: 1;
    min-width: 250px;
}

.vs-symbol {
    font-size: 2rem;
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 配对分析结果 */
.compatibility-scores {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.score-circle {
    position: relative;
    width: 150px;
    height: 150px;
}

.circle-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--accent-color) 0deg, rgba(255,255,255,0.1) 0deg);
    position: relative;
}

.circle-progress::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: var(--bg-color);
}

.score-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    z-index: 1;
}

.score-label {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    z-index: 1;
}

.detailed-compatibility {
    flex: 1;
    min-width: 300px;
}

.compat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.compat-label {
    min-width: 100px;
    font-weight: bold;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 4px;
    transition: width 1s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    margin-left: 1rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* 分析章节 */
.compatibility-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.analysis-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.analysis-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.analysis-section ul {
    list-style: none;
}

.analysis-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding-left: 1.5rem;
}

.analysis-section li::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 0.5rem;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 244, 230, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 182, 193, 0.3);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
    box-shadow: 0 0 15px rgba(255, 182, 193, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 105, 135, 0.4);
}

/* 统计卡片 */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 历史记录列表 */
.history-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 1rem;
}

.history-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-type {
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.history-date {
    font-size: 0.9rem;
    opacity: 0.7;
}

.history-question {
    margin-bottom: 0.5rem;
    font-style: italic;
}

.accuracy-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .constellation-main {
        padding: 1rem 0.5rem;
    }
    
    .zodiac-wheel {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    .constellation-item {
        padding: 1rem 0.5rem;
    }
    
    .constellation-symbol {
        font-size: 2rem;
    }
    
    .horoscope-card {
        padding: 1rem;
    }
    
    .horoscope-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .selected-symbol {
        font-size: 2rem;
    }
    
    .detailed-scores {
        grid-template-columns: 1fr;
    }
    
    .lucky-elements {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feature-nav {
        gap: 0.5rem;
    }
    
    .nav-btn {
        min-width: 90px;
        padding: 0.8rem 1rem;
    }
    
    .constellation-selectors {
        flex-direction: column;
        gap: 1rem;
    }
    
    .compatibility-scores {
        flex-direction: column;
        gap: 2rem;
    }
    
    .compatibility-analysis {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffed4e;
}

/* 占卜结果样式 */
.divination-result {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.tarot-cards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tarot-card {
    width: 120px;
    height: 180px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.tarot-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: 0 15px 30px rgba(255, 105, 135, 0.4);
}

.tarot-card.reversed {
    background: var(--gradient-secondary);
}

.tarot-card.reversed::after {
    content: '↺';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.card-name {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.card-name-cn {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 个人星盘样式 */
.chart-info {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 2rem;
}

.main-signs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.sign-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.sign-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.sign-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.planetary-positions,
.houses-info {
    margin-top: 2rem;
}

.planetary-positions h4,
.houses-info h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.planet-item,
.house-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.planet-name,
.house-number {
    font-weight: bold;
}

.planet-position,
.house-sign {
    color: var(--accent-color);
}

/* 隐藏和显示动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-out {
    animation: fadeOut 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}